package com.y4oung.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.y4oung.dao.IBusinessDao;
import com.y4oung.model.Business;
import com.y4oung.model.BusinessNew;
import com.y4oung.service.IBusinessService;

@Service("businessService")
public class BusiServiceImpl implements IBusinessService{
	public BusiServiceImpl(){

	}

	@Autowired
	@Resource
	private IBusinessDao BusinessDao;
	Business business = new Business();
	
	public List<Business> showBusinessList() {
		return BusinessDao.showBusinessList();
	}
	
	public List<BusinessNew> showBusinessNew(int businessId){
		return BusinessDao.showBusinessNew(businessId);
	}
	
	public Business showBusiness(int businessId){
		return BusinessDao.showBusiness(businessId);
	}

	public List<Business> showByColumns(String cuisine,String region,String type){
		business.setCuisine(cuisine);
		business.setRegion(region);
		business.setType(type);
		return BusinessDao.showByColumns(business);
	}

	public List<Business> orderByColumns(Map map){
		return BusinessDao.orderByColumns(map);
	}

	public List<Business> searchBusiness(Map map){
		return BusinessDao.searchBusiness(map);
	}

	public List<Business> searchBusinessAccurate(Map map) {
		return BusinessDao.searchBusinessAccurate(map);
	}
}
